<script setup>
import {deleteApi} from '@/api/quality/text'
import { ref ,getCurrentInstance} from 'vue';
import { ElMessage ,ElMessageBox} from 'element-plus';

const instance = getCurrentInstance()
// 删除方法
const deleteSubmit = async(id)=>{
   await ElMessageBox.confirm(
      '确定要删除这条记录吗？此操作不可恢复！',
      '删除确认',
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      }
    )
  let result =await deleteApi(id)
  instance.emit('search')
}
// 向父组件暴露
defineExpose({
deleteSubmit
})
</script>
<template></template>